package com.wing.sys.dao;

import org.springframework.stereotype.Repository;

import com.wing.common.CommonSpringJDBC;
import com.wing.common.util.PageBean;
import com.wing.sys.domain.Operatelog;

@Repository
public class OperatelogDao extends CommonSpringJDBC<Operatelog, String> {

	public PageBean findPageList(int currentPage, int pageSize, Object... args) {
		String sql1=" SELECT o.*,u.name oname FROM sys_operate_log o left join sys_user u on o.user_id = u.id ORDER BY o.log_time desc  " +
			" LIMIT "+(currentPage-1) * pageSize+","+pageSize;
		String sql2 = "select count(o.id) from sys_operate_log o  ";
		
		String[] sqlArray = {sql1,sql2 };
		return super.findPageList(sqlArray, currentPage, pageSize);
	}
	
}
